﻿<h2 class="tab-cont-h2">
  <a href="javascript:;">标单管理</a> > <span onclick=" window.location.reload();">标单列表</span>
 </h2>
<div class="action-bar">
    <a href="javascript:;"  class="btn btn-primary" data-name="addItem">新 增</a>
    <a href="javascript:;" class="btn btn-primary" data-billid="0" id="editItemBtn">修 改</a>
    
</div>
<div id="tabCon">
</div>


<!--修改弹框-->
<div class="modal fade model editItemmodel" id="editItemModel" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document" style="width:1000px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="dataTitle">修改标单</h4>
            </div>
            <div class="modal-body">
                 <form class="additem" id="edititemForm">
        
                 </form>
            </div>
        </div>
    </div>
</div>

<script type="text/template" id="edititemTmp">
    <div class="form">
            <div class="group">
                <label class="l-label">取 货 地：</label>
                <div class="l-area">
                    <div class="col1">
                        <select class="select select1" data-name="editprovince" id="editstart_pro_id">
                        </select>
                        <select class="select select1" data-name="editcity" id="editstart_city_id">
                        </select>
                        <select class="select  select1" data-name="edittown" id="editstart_town_id">
                        </select>
                    </div>
                    <div class="col1">
                        <input class="input input2" placeholder="详细地址" id="editstart_address" name="editstart_address" value="<%=start_address%>">
                        <label class="s-label">取货时间：</label>
                        <span style="position: relative; z-index: 9999;"><input class="input input3 datepicker" id="editconsignee_time" name="editconsignee_time" value="<%=consignee_time%>" data-date-format="yyyy-mm-dd hh:ii"></span>
                    </div>
                </div>
            </div>
            <div class="group" data-name="receipt">
                <label class="l-label">收 货 地：</label>
                <div class="l-area">
                    <div class="col1">
                        <select class="select select1" data-name="editprovince" id="editend_pro_id">
                            
                        </select>
                        <select class="select select1" data-name="editcity" id="editend_city_id">
                           
                        </select>
                        <select class="select select1" data-name="edittown" id="editend_town_id">
                          
                        </select>
                    </div>
                    <div class="col1">
                    <input class="input input2" placeholder="详细地址" id="editend_address" name="editend_address" value="<%=end_address%>">
                        <label class="s-label">到货时间：</label>
                        <input class="input input3 datepicker" id="editreceipt_time" name="editreceipt_time" value="<%=receipt_time%>" data-date-format="yyyy-mm-dd hh:ii">
                    </div>
                    <div class="col1 none">
                        <select class="select select2" id="editstart_receipt_hour">
                        </select>时 －
                        <select class="select select2" id="editend_receipt_hour">
                        </select>时
                    </div>
                </div>
            </div>
            <div id="receiptAdd" data-isset="0">
                <input type="hidden" id="editend_city_id2" name="editend_city_id2" />
                <input type="hidden" id="editend_city_name2" name="editend_city_name2" />
                <input type="hidden" id="editend_address2" name="editend_address2" />
            </div>
            <div class="group">
                <label class="l-label">开标时间：</label>
                <div class="l-area">
                    <input class="input input1 datepicker " id="editstart_bid_time" name="editstart_bid_time" value="<%=start_bid_time%>" data-date-format="yyyy-mm-dd hh:ii">
                </div>
            </div>
            <div class="group">
                <label class="l-label">结束时间：</label>
                <div class="l-area">
                    
                    <label class="l-radio">
                        <input type="radio" name="editend_bid_time" value="" checked>其他时间
                        <input type="text" class="input input4 datepicker" id="editendbid_other" style="width:157px;" value="<%=end_bid_time%>">
                    </label>
                </div>
            </div>
            <div class="group">
                <label class="l-label">货物属性：</label>
                <div class="l-area">
                    <label class="l-radio">
                        <input type="radio" name="editdanger" value="1" <%if(danger==1){%>checked<%}%>>普通
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="editdanger" value="50" <%if(danger==50){%>checked<%}%>>半危险品
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="editdanger" value="100" <%if(danger==100){%>checked<%}%>>危险品
                    </label>
                </div>
            </div>
            <div class="group">
                <label class="l-label">物品资质：</label>
                <div class="l-area">
                    <select class="select select3" id="editwuliu_type" name="editwuliu_type">
                        <option value="1" text=0 <%if(wuliu_type==0){%>selected="selected"<%}%>>普通货物承载</option>
                        <option value="10" text=1 <%if(wuliu_type==1){%>selected="selected"<%}%>>危险品货物承载</option>
                    </select>
                </div>
            </div>
            <div class="group">
                <label class="l-label">ERP编号：</label>
                <div class="l-area">
                    <input class="input input5" id="editnumber" name="editnumber" value="<%=number%>">
                </div>
            </div>
            <div class="group">
                <label class="l-label">详情描述：</label>
                <div class="l-area">
                    <textarea placeholder="请限制在1000字以内..." id="editinformation" name="editinformation" class="textarea textarea1"><%=information%></textarea>
                </div>
            </div>
            <div class="group">
                <label class="l-label">联 系 人：</label>
                <div class="l-area">
                    <select class="select select3" id="editcontacts">
                        
                    </select>
                </div>
            </div>
            <div class="group">
                <label class="l-label">备注信息：</label>
                <div class="l-area">
                    <textarea placeholder="请限制在500字以内..." class="textarea textarea2" name="editremark" id="editremark"><%=remark%></textarea>
                </div>
            </div>
            <div class="group">
                <label class="l-label">销售人员：</label>
                <div class="l-area">
                    <select class="select select3" id="editstaff" name="editstaff">
                    </select>
                </div>
            </div>
        </div>
        <div class="btn-area">
           <%if(!!bool){%>
            <input type="submit" id="editbtnSure" class="btn sure" value="确定">
            <a href="javascript:;" id="editbtnCancel" class="btn cancel" onclick=" window.location.reload();" data-dismiss="modal" aria-label="Close">取消</a>
            <%}%>
        </div>
</script>
<!-- <div id="standardAdd">
</div> -->
<script type="text/template" id="addItemTpl">
    <form class="additem" id="addItem">
        <h2 class="tab-cont-h2">
      <a href="javascript:;" onclick=" window.location.reload();" >标单管理</a> > <a onclick=" window.location.reload();" href="javascript:;">标单管理</a> > <span>新增标单</span>
    </h2>
        <div class="form">
            <div class="group">
                <label class="l-label">取 货 地：</label>
                <div class="l-area">
                    <div class="col1">
                        <select class="select select1" data-name="tprovince" id="start_pro_id">
                        </select>
                        <select class="select select1" data-name="tcity" id="start_city_id">
                        </select>
                        <select class="select  select1" data-name="ttown" id="start_town_id">
                        </select>
                    </div>
                    <div class="col1">
                        <input class="input input2" placeholder="详细地址" id="start_address" name="start_address">
                        <label class="s-label">取货时间：</label>
                        <input class="input input3 datepicker" id="consignee_time" name="consignee_time">
                    </div>
                </div>
            </div>
            <div class="group" data-name="receipt">
                <label class="l-label">收 货 地：</label>
                <div class="l-area">
                    <div class="col1">
                        <select class="select select1" data-name="oprovince" id="end_pro_id">
                            <option>省</option>
                        </select>
                        <select class="select select1" data-name="ocity" id="end_city_id">
                            <option>市</option>
                        </select>
                        <select class="select select1" data-name="otown" id="end_town_id">
                            <option>区</option>
                        </select>
                    </div>
                    <div class="col1">
                        <input class="input input2" placeholder="详细地址" id="end_address" name="end_address">
                        <label class="s-label">到货时间：</label>
                        <input class="input input3 datepicker" id="receipt_time" name="receipt_time">
                    </div>
                    <div class="col1 none">
                        <select class="select select2" id="start_receipt_hour">
                        </select>时 －
                        <select class="select select2" id="end_receipt_hour">
                        </select>时
                        <!--/*<a href="javascript:;" id="add" class="add">添加目的地</a>*/-->
                    </div>
                </div>
            </div>
            <div id="receiptAdd" data-isset="0">
                <input type="hidden" id="end_city_id2" name="end_city_id2" />
                <input type="hidden" id="end_city_name2" name="end_city_name2" />
                <input type="hidden" id="end_address2" name="end_address2" />
            </div>
            <div class="group">
                <label class="l-label">开标时间：</label>
                <div class="l-area">
                    <input class="input input1 datepicker " id="start_bid_time" name="start_bid_time">
                </div>
            </div>
            <div class="group">
                <label class="l-label">结束时间：</label>
                <div class="l-area">
                    <label class="l-radio">
                        <input type="radio" name="end_bid_time" value="10" checked>10分钟
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="end_bid_time" value="20">20分钟
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="end_bid_time" value="30">30分钟
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="end_bid_time" value="60">1小时
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="end_bid_time" value="120">2小时
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="end_bid_time" value="-1">其他时间
                         <input type="text" class="input input4 datepicker" id="editendbid_other" style="width:157px;">
                        <!--<input type="text" class="input input4 datepicker" id="endbid_other" style="width:157px;">-->
                    </label>
                </div>
            </div>
            <div class="group">
                <label class="l-label">货品属性：</label>
                <div class="l-area">
                    <label class="l-radio">
                        <input type="radio" name="danger" value="1" checked>普通
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="danger" value="50">半危险品
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="danger" value="100">危险品
                    </label>
                </div>
            </div>
            <div class="group">
                <label class="l-label">物品资质：</label>
                <div class="l-area">
                    <select class="select select3" id="wuliu_type" name="wuliu_type">
                        <option value="1" text=0>普通货物承载</option>
                        <option value="10" text=1>危险品货物承载</option>
                    </select>
                </div>
            </div>
            <div class="group">
                <label class="l-label">ERP编号：</label>
                <div class="l-area">
                    <input class="input input5" id="number" name="number">
                </div>
            </div>
            <div class="group">
                <label class="l-label">详情描述：</label>
                <div class="l-area">
                    <textarea placeholder="请限制在1000字以内..." id="information" name="information" class="textarea textarea1"></textarea>
                </div>
            </div>
            <div class="group">
                <label class="l-label">联 系 人：</label>
                <div class="l-area">
                    <select class="select select3" id="contacts">
                        
                    </select>
                </div>
            </div>
            <div class="group">
                <label class="l-label">备注信息：</label>
                <div class="l-area">
                    <textarea placeholder="请限制在500字以内..." class="textarea textarea2" name="remark" id="remark"></textarea>
                </div>
            </div>
            <div class="group">
                <label class="l-label">销售人员：</label>
                <div class="l-area">
                    <select class="select select3" id="staff" name="staff">
                    </select>
                </div>
            </div>
        </div>
        <div class="btn-area">
            <input type="submit" id="btnSure" class="btn sure" value="确定">
            <a href="javascript:;" id="btnCancel" onclick=" window.location.reload();" class="btn cancel">取消</a>
        </div>
    </form>
</script>
<script type="text/javascript" src="jquery.validate.min.js"></script>
<script type="text/javascript" src="bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script src="standard_tablist.js"></script>
<script src="standard_add.js"></script>
<script type="text/template" id="selTpl">
    <table class="table table-hover table-responsive">
        <tr class="thead">
            <td class="td1">企业编号</td>
            <td class="td2">企业名称</td>
            <td class="td3">竞标价格</td>
            <td class="td4">报价时间</td>
            <td class="td5">操作</td>
        </tr>
        <tr class="trh7">
            <td class="" colspan="5">&nbsp;</td>
        </tr>
        <%_.each(obj,function(item,i){%>
            <tbody class="tbody tbody-<%=(i%2 == 0 ? 1:2)%>">
                <tr>
                    <td>
                        <a href="">
                            <%=item._wuliu_no%>
                        </a>
                    </td>
                    <td>
                        <%=item._wuliu_name%>
                    </td>
                    <td>
                        <%=item._tax_price%>
                    </td>
                    <td>
                        <%=item._operator_time%>
                    </td>
                    <td><a href="javascript:;" data-name="selBid" data-itemid="<%=item._bid_wl_id%>" data-mybid="<%=item._bid_id%>">选中</a></td>
                </tr>
            </tbody>
            <%})%>
    </table>
</script>
<script type="text/template" id="listTpl">
    <table class="table table-hover table-responsive">
        <tr class="thead">
            <td class="td1">
                标书编号</td>
            <td class="td2">订单编号</td>
            <td class="td3">开标时间</td>
            <td class="td4">结标时间</td>
            <td class="td5">收货地</td>
            <td class="td6">状态</td>
            <td class="td7">操作</td>
        </tr>
        <tr class="trh7">
            <td class=""></td>
            <td class=""></td>
            <td class=""></td>
            <td class=""></td>
            <td class=""></td>
            <td class=""></td>
            <td class=""></td>
        </tr>
        <%_.each(obj,function(item,i){%>
            <tbody class="tbody tbody-<%=(i%2==0 ? 1 :2)%>">
                <tr>
                    <td class="td1" style="width:175px;">
                        <label>
                            <input type="checkbox" class="input-mt2" name="inputBid" data-billid="<%=item.bid_id%>" <%if(item.state!=1){%>style="display:none;"<%}%>/>
                            <a href="javascript:;" class="bid-no" data-id="<%=item.bid_id%>">
                                <%=item.bid_no%>
                            </a>
                        </label>
                    </td>
                    <td class="tdtextal">
                        <%=item.number%>
                    </td>
                    <td class="">
                        <%=item.start_bid_time%>
                    </td>
                    <td class="">
                        <%=item.end_bid_time%>
                    </td>
                    <td class="tdtextal">
                        <%=item.end_address%>
                    </td>
                    <td class="">
                    <%if(item.del_flag==1){%>
                        <%if(item.state==1){%>
                          新增标书
                          <%}else if(item.state==30){%>
                              竞标中
                          <%}else if(item.state==40){%>
                              竞标结束
                          <%}else if(item.state==100){%>
                              等待取货
                          <%}else if(item.state==105){%>
                              未取货
                          <%}else if(item.state==110){%>
                              取货成功
                          <%}else if(item.state==115){%>
                              到货确认
                          <%}else if(item.state==120){%>
                              回单确认
                          <%}else if(item.state==150){%>
                              已结款
                          <%}else if(item.state==-1){%>
                              删除
                          <%}%>
                        <%}else if(item.del_flag==10){%>
                        废标
                        <%}else if(item.del_flag==20){%>
                        流标
                        <%}%>
                       </td>
                    <td class="td7"><a href="#" class="sel" data-toggle="modal" data-target="#selModel" data-itemid="<%=item.bid_id%>">选标</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" data-toggle="modal" data-target="#delModel" data-itemid="<%=item.bid_id%>" data-bidno="<%=item.bid_No%>">废标</a>
                   <!-- <a href="javascript:;" class="j_look" billid="<%=item.bid_id%>">查看详情</a>-->
                    </td>
                </tr>
            </tbody>
            <%})%>
    </table>
</script>
